//工具性的js函数
// (function(){
// var $=function(id){return document.getElementById(id);}
// })();

function checkForValidUrl(tabId, changeInfo, tab){
	tabUrl = tab.url;
	if(tabUrl.indexOf("user.qzone.qq.com") > -1){
		//这是QZONE呢
		chrome.pageAction.show(tabId);
		console.log("点赞狂魔：这里是Qzone!"+tabUrl);
	}
	else if(tabUrl.indexOf("weibo.com") > -1){
		//这里是微博呢
		chrome.pageAction.show(tabId);
		console.log("点赞狂魔：这里是weibo!"+tabUrl);
	}
	else if(tabUrl.indexOf("www.renren.com") > -1){
		chrome.pageAction.show(tabId);
		console.log("点赞狂魔：这里是RenRen"+tabUrl);
	}
}
chrome.tabs.onUpdated.addListener(checkForValidUrl);